HOW TO INSTALL AND START A SERVER
---------------------------------

SECTIONS:
2002-10-30 Build 441
2002-11-20 Build 464
2002-12-26 Build 490
2003-01-03 Build 493
2003-01-16 Build 496

>>>> BE SURE TO READ THEM ALL <<<<



2002-10-30 Build 441
--------------------

Yes, there will be a readme soon.  This is a simple set of instructions for the moment.

To Install:
1) Copy this directory somewhere on the host machine.

2) Make sure ports are free:
	tcp 26100 - 26110 
	udp 2302 - 2400
	tcp 27100 - 27110
	udp 27100  27110
	tcp 8085 and 6073
	udp 8085 and 6073

3) A future addition to the server kit will require .NET, you might want to install it now.
   The requirement is for the 1.0 .NET Framework Redistributable with SP2. There is a number of ways you can get it.

	A. Most people will have it as an option if they use Windows Update.

	B. You can also go to http://msdn.microsoft.com/netframework/downloads/default.asp and follow the links to get the version you want.

	C. Or the direct links are as follows

	Microsoft .NET Framework Redistributable  1.0

	http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/001/829/msdncompositedoc.xml

	Microsoft .NET Framework SP2

	http://msdn.microsoft.com/netframework/downloads/updates/sp/download.asp

	I think you need to get both the Redistributable and the SP2, Im not sure if MS bundled it.


4) In the Assets/Scripts/Campaigns, there is a file "Campaign 1.mct".  You MUST modify Name and Description.

5) Review and modify any GF settings in Assets/ServerProfiles as necessary.  Make sure you are careful.  You might want to start a server with the default settings first, just to make sure all is fine.

6) Run ServerPlatform.exe

7) Choose "1" (_CentralSwitchPlusAllServers) to start the server.

Enjoy.

Make sure you join the mailing list to get the latest news...
http://groups.yahoo.com/group/DynaverseAdministrators/join


2002-11-20 Build 464
--------------------

Notes on using the new LogViewer:
1) The current Debug.gf settings will have the system log to the LogViewer ONLY, so don't be surprised to not see any output on the server.  Remember to run LogViewer before starting the server.

2) There is a simple filter system:

	If you click View | Set Filter an edit box will come up. You can enter any RegEx (Regular Expression) in there and it will filter the output. Its still rather crude and untested; if you enter an expression that is not a RegEx then it will crash (just found that out myself).  However, I thought it would be fun to play with. To clear the filter just enter an empty string or .*

3) It will only display 1000 elements. That was a last minute fix for a performance issue. It might be able to do much more then that, but I didnt want to take a chance.

4) A log file is always created, it is given the date the log file was created, and it is placed in the same directory LogViewer.exe is run from.

5) If you didnt use the default Debug.gf that came with the new kit, then you should make sure your [Log] section looks like this:

[Log]
LogToLogViewer            = 1                                           // (1)
LogViewerName             = "LogViewer"    // "LogViewer"
LogToConsole              = 0                                           // (0)
LogToDebugOutput          = 0                                           // (0)
LogToEventViewer          = 0                                           // (0)
EventViewer               = ""                               // Machine Name ("meta1")
LogToFile                 = 0                                           // (0)
LogFileName               = "logfile.log"


You only really want the LogViewer on. If you turn on the other logging systems the servers performance will be negatively affected


2002-12-26 Build 490
--------------------

SQL Alpha Test!

The system will use SQL instead of the flat memory system based on the setting UseSQL in Database.gf.

[SQL]
UseSQL							= 1				// (0) 0 = use flat file, 1 = use SQL
DSN								= "SFCTNG;"		// DSN of database to connect to (can be local, shared, over the internet, whatever!  Password (if used) is stored here as well.)
DumpLog							= 3				// (0) 0 = log nothing, 1 = log each command in separate files, 2 = use one file, 3 = log into one file and separate files

WARNING:
	SQL support has only been tested under Windows XP and MS-SQL.  Theoretically only the creation scripts are different between MS-SQL and MySQL and the system should work under MySQL (since it originally *was* under MySQL).  There is a chance that this release will not even run under MySQL.

Preparation to use SQL:
1) ADO connection to ODBC
	MS-SQL and Windows XP:
		Already set up.

	MS-SQL and Windows 2000 or Windows NT 4.0:
		Install MDAC (Microsoft Data Access Components).
		http://www.microsoft.com/downloads/details.aspx?FamilyID=6a7d785f-c2e0-471d-a33b-82ad1d514737&DisplayLang=en

	MS-SQL or MySQL and Windows 98 or Windows ME:
		Not supported.  Though it might all work, we will be adding functions in the future that will only support Windows NT/2K/XP and above - so you should not run a server under these OS's.

	MySQL and Windows XP, 2000, NT 4.0:
		Install MDAC (Microsoft Data Access Components).
		http://www.microsoft.com/downloads/details.aspx?FamilyID=6a7d785f-c2e0-471d-a33b-82ad1d514737&DisplayLang=en

		Install an ADO driver for MySQL (MySQL Connector/ODBC).
		http://www.mysql.com/products/myodbc/

	Oracle SQL Server:
		Unknown.

2) Create database, prepare blank tables.
	MS-SQL:
		Run "SQL Server Enterprise Manager" and create a database called "SFC3" (or whatever, you will use this name when setting up the DSN later).
		Run "SQL Query Analyzer" and execute on the SFC3 database, the script "CreateTables.sql".  This will set the database to it's default state, ready to start.
		If you want to restart a server, first run "DestroyTables.sql", then "CreateTables.sql" again.
		These scripts are in SQL\MS-SQL.

	MySQL:
		Run MySQL.  I think you may have to create the database, but I don't remember.  Execute the script "CreateTables.sql" to create the tables in their default state, ready to start.
		If you want to restart a server, first run "DestroyTables.sql", then "CreateTables.sql" again.
		These scripts are in SQL\MySQL.

	Oracle:
		Not yet supported.

Steps to use SQL:
1) Set UseSQL to 1 in Database.gf.

2) Load the ODBC Data Source Administrator (under the Control Panel, possibly under Administrative Tools).

3) Create a System DSN using the name "SFCTNG" (this must match DSN in Database.gf).  Connect this DSN to your SQL server.  If you are using MS-SQL, it should be available to choose (serving your machine under the Machine Name, using database SFC3, etc.).  If you are using MySQL, you will have already set up an ADO for MySQL that you would choose (SFC3).

4) Since this is an Alpha Test, you will want to have DumpLog set to 3, so that on an error - we can see what SQL command failed.  The files are output to the SQLLOG directory.

5) Launch the server and there you go!

Known issues:
1) If the server crashes, it does not update the "current" object ID.  So it always adds 100 to the current setting in table DatabaseDescription, field NextID.  So if you crash, you may want to increase this #.  This will be fixed when the system analyzes all of the tables and determines the NextID correctly.

2) MySQL is untested.  So it might not work at all.


2003-01-03 Build 493
--------------------

More SQL testing!

MySQL is now supported.  Known issues from Build 490 are fixed (correct object IDs, regardless of server exiting properly or crash).

Refer to the readme for other issues fixed, etc.

I have run through installing MySQL, MyODBC on Windows XP as an example of using the system with MySQL:

I downloaded and used the following from mysql.com:
mysql-3.23.54-win.zip
myodbc-2.50.39-nt.zip


Simple MySQL under WinXP instructions:
1) Unzip MySQL, install to C:\MySQL

2) copy C:\MySQL\my-huge.cnf c:\My.cnf

3) go to C:\MySQL\bin, run:
   "mysqld-max-nt --install"

4) Start Start|Administrative Tools|Component Servers, go to Services (local), then double-click the service "MySQL".

5) This should be set as automatic and not yet started.  Click Start.  Then OK and exit Component Services.

6) go to C:\MySQL\bin, run:

   "mysqlshow"

   It should put out:
+-----------+
| Databases |
+-----------+
| mysql     |
| test      |
+-----------+

7) MySQL is now properly installed as a service, it should always be available now.

8) Copy the SQL\MySQL scripts over to c:\MySQL\Scripts.

9) Need to setup blank SFC3 tables. go to c:\MySQL\bin, run:

   "mysql"

10) Type the following command to create the SFC3 database, this only needs to be done once:

   "create database SFC3;"

11) Run the script to create the tables fresh:

    "source ..\scripts\CreateTables.sql"

    It should put out:
Database changed
Query OK, 0 rows affected (0.03 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.02 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.02 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 16 rows affected (0.00 sec)
Records: 16  Duplicates: 0  Warnings: 0

Query OK, 1 row affected (0.00 sec)

+------------------------+
| Tables_in_sfc3         |
+------------------------+
| banned                 |
| biditem                |
| campaigninfo           |
| databasedescription    |
| goal                   |
| mapdescription         |
| maphex                 |
| newsstory              |
| notify                 |
| officer                |
| politicaltensionmatrix |
| preparedmissions       |
| servcharacter          |
| ship                   |
| tablenames             |
| turndescription        |
+------------------------+
16 rows in set (0.00 sec)

+----+---------------------+--------+--------+------------+
| ID | Locked              | LockID | NextID | NextLockID |
+----+---------------------+--------+--------+------------+
|  1 | 1969-12-31 16:00:00 |      0 |     18 |          1 |
+----+---------------------+--------+--------+------------+
1 row in set (0.02 sec)

+----+--------+--------+------------------------+
| ID | Locked | LockID | Name                   |
+----+--------+--------+------------------------+
|  2 | NULL   |   NULL | TableNames             |
|  3 | NULL   |   NULL | TurnDescription        |
|  4 | NULL   |   NULL | DatabaseDescription    |
|  5 | NULL   |   NULL | MapDescription         |
|  6 | NULL   |   NULL | MapHex                 |
|  7 | NULL   |   NULL | PoliticalTensionMatrix |
|  8 | NULL   |   NULL | ServCharacter          |
|  9 | NULL   |   NULL | BidItem                |
| 10 | NULL   |   NULL | Ship                   |
| 11 | NULL   |   NULL | CampaignInfo           |
| 12 | NULL   |   NULL | Notify                 |
| 13 | NULL   |   NULL | NewsStory              |
| 14 | NULL   |   NULL | PreparedMissions       |
| 15 | NULL   |   NULL | Goal                   |
| 16 | NULL   |   NULL | Officer                |
| 17 | NULL   |   NULL | Banned                 |
+----+--------+--------+------------------------+
16 rows in set (0.00 sec)

12) Now you need to set up MyODBC.

MyODBC:
13) Unzip MyODBC, run "Setup.exe".  I skipped setting up the ODBC connection within the setup, the following 

steps are what I did.

14) Start Start|Administrative Tools|Data Sources (ODBC)

15) Change to the System DSN tab

16) Add a MySQL data source, use "SFCTNG" as the DSN, SFC3 as the database name.  Set up user, password, etc. 

as you please (for my tests, I didn't bother with that).  I set the "Allow BIG results" option, but I have not 

researched the options.

17) It should work now.  Best of luck!!!



2003-01-16 Build 496
--------------------

1) It has been suggested that the newer MyODBC driver is better to use (3.51 Gamma).  It has not been tested internally yet.

http://www.mysql.com/downloads/api-myodbc-3.51.html

Reference:
http://www.mysql.com/products/myodbc/faq_1.html#MyODBC_3.51


2) Here is a sample my.cnf (used for MySQL, at the root of the drive with MySQL installed) prepared by one of the SQL testers:

# Modified mysql config file.
# This file is based on settings in the my-large.cnf support file.
#
# Copy this file to c:\my.cnf to set global options
# 
# One can use all long options that the program supports.
# Run the program with --help to get a list of available options

# This will be passed to all mysql clients
[client]
#password=my_password
port=3306
#socket=MySQL

# Here is entries for some specific programs
# The following values assume you have at least 256M ram 
# and are running MySQL paralle to either a web server or other type of server

# The MySQL server
[mysqld]
port=3306
#socket=MySQL
skip-locking
default-character-set=latin1
set-variable = key_buffer=128M
set-variable = max_allowed_packet=1M
set-variable = max_connections=250
set-variable = table_cache=128
set-variable = sort_buffer=1M
set-variable = record_buffer=1M
set-variable = net_buffer_length=8K
set-variable = myisam_sort_buffer_size=32M
set-variable = thread_stack=256K
set-variable = flush_time=1800
# possible settings that may do nothing at all
set-variable = thread_cache=8
set-variable = thread_concurrency=8
log-bin
server-id = 1

# Uncomment the following rows if you move the MySQL distribution to another
# location
#basedir = d:/mysql/
#datadir = d:/mysql/data/

# Uncomment the following rows if you are using InnoDB tables
# Create the directories ibdata and iblogs before to start the server.
# If necessary, modify the size of the files

#innodb_data_file_path = ibdata1:200M
#innodb_data_home_dir = c:\ibdata
#set-variable = innodb_mirrored_log_groups=1
#innodb_log_group_home_dir = c:\iblogs
#set-variable = innodb_log_files_in_group=3
#set-variable = innodb_log_file_size=30M
#set-variable = innodb_log_buffer_size=8M
#innodb_flush_log_at_trx_commit=1
#innodb_log_arch_dir = c:\iblogs
#innodb_log_archive=0
#set-variable = innodb_buffer_pool_size=80M
#set-variable=lower_case_table_names =0
#set-variable = innodb_additional_mem_pool_size=10M
#set-variable = innodb_file_io_threads=4
#set-variable = innodb_lock_wait_timeout=50

# Uncomment the following row if you are using a Max server and you don't want the
# InnoDb tables

#skip-innodb

[mysqldump]
quick
set-variable = max_allowed_packet=16M

[mysql]
no-auto-rehash

[isamchk]
set-variable= key=16M

[client_fltk]
help_file= c:\mysql\sql_client\MySQL.help
client_file= c:\mysql\MySQL.options
history_length=20
database = test
queries_root= c:\mysql\queries
last_database_file= c:\mysql\lastdb
